<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="centre/manage/include :: header">
</head>

<link rel="stylesheet" type="text/css" href="/css/plugins/layui/layui.css"/>
<link href="/css/jquery-select/jquery.searchableSelect.css" rel="stylesheet" type="text/css">
<style>
    .province {
        float: left;
        position: relative;
        width: 150px;
        height: 35px;
        line-height: 35px;
        border: 1px solid #fff;
        proddes
    }

    .province:hover {
        border: 1px solid #f7e4a5;
        border-bottom: 1px solid #fffec6;
        background: #fffec6;
    }

    .province .cityall {
        margin-top: 10px;
    }

    .province ul {
        list-style: outside none none;
        position: absolute;
        padding: 0;
        background: #fffec6;
        border: 1px solid #f7e4a5;
        display: none;
        width: auto;
        width: 300px;
        z-index: 999999;
        left: -26px;
        top: 33px;
    }

    .province ul li {
        float: left;
        min-width: 60px;
        margin-left: 20px;
        height: 30px;
        line-height: 30px;
    }

    .province .checkbox-inline {
        padding-top: 0;
    }

    h3, h4, h5 {
        margin: 5px 0;
        font-weight: 600;
    }

    input[type=email], input[type=url], input[type=search], input[type=tel],
    input[type=color], input[type=text], input[type=password], input[type=datetime],
    input[type=datetime-local], input[type=date], input[type=month], input[type=time],
    input[type=week], input[type=number], textarea {
        border-radius: 0 !important;
        color: #858585;
        background-color: #FFF;
        border: 1px solid #D5D5D5;
        padding: 5px 4px 6px;
        font-size: 14px;
        font-family: inherit;
        -webkit-box-shadow: none !important;
        box-shadow: none !important;
        -webkit-transition-duration: .1s;
        transition-duration: .1s;
    }

    .spectable td, .spectable th {
        border: 1px solid #ccc;
        vertical-align: middle;
        text-align: center;
    }

    .spectable th {
        font-weight: bold;
    }

    .spectableinput {
        text-align: center;
    }

    .f {
        border-color: #b94a48;
        -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
        -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    }

    .table.table-bordered tr th, .table.table-bordered tr td {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    select {
        padding: 3px 4px;
        height: 30px;
    }

    /* .tags {
        display: inline-block;
        padding: 4px 6px;
        color: #777;
        vertical-align: middle;
        background-color: #FFF;
        border: 1px solid #D5D5D5;
        width: 206px;
    } */
    .thumbnailImg {
        height: 200px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="form-horizontal m-t">
                <div class="ibox-title">
                    <div class="gg-nav">
                        <ul class="nav nav-tabs">
                            <li id="danpinShow"><a href="#danPin" data-toggle="tab">单品</a></li>
                            <li id="taocanShow"><a href="#taoCan" data-toggle="tab">套餐</a></li>
                        </ul>
                    </div>
                </div>
                <div class="tab-content">
                    <input id="productType" type="hidden" name="productType" value="6"/>
                    <input type="hidden" id="categoryType" value="5">
                    <input
                            id="id" name="id"
                            type="hidden" th:value="${product.id}">
                    <!--                单品商品新增-->
                    <div id="danPin" class="ibox-content tab-pane fade">
                        <div class="panel panel-default" style="padding-left: 0px;background-color:#EEEEEE">
                            <div class="panel-body panel-background">
                                <span>基本信息</span>
                            </div>
                        </div>
                        <div class="tab-content" style="border: 0px;">
                            <div class="tab-pane active">
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;">排序:</label>
                                    <div class="col-sm-6">
                                        <input id="displayorder" name="displayorder" th:value="${product.displayorder}"
                                               class="form-control" type="number" min="0" maxlength="10"
                                               placeholder="数字越大，排名越靠前,限制小于2147483647">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;"><em class="gg-star"
                                                                                          style="margin-right: 7px">*</em>单品名称:</label>
                                    <div class="col-sm-6">
                                        <input id="title" name="title" placeholder="请输入30字以内的单品名称"
                                               class="form-control" type="text" maxlength="30" th:value="${product.title}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;">商品短标题:</label>
                                    <div class="col-sm-6">
                                        <input id="shortTitle" name="shortTitle" placeholder="打印专用短标题(8个汉字以内)"
                                               class="form-control" type="text" maxlength="8" th:value="${product.shortTitle}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;"> <em class="gg-star"
                                                                                           style="margin-right: 7px">*</em>分类：
                                    </label>
                                    <div class="col-sm-3">
                                        <div class="class-close-content">
                                            <input type="text" id="pcateName" class="form-control chosen-select"
                                                   placeholder="顶级分类"
                                                   onclick="toCategoryOne()" readonly th:value="${product.pcateName}"/>
                                            <a id="pcate-close" class="glyphicon glyphicon-remove close-icon"
                                               onclick="categoryCloseClick('one')"></a>
                                        </div>
                                        <input type="hidden" id="pcate" name="pcate" th:value="${product.pcate}"/>
                                    </div>
                                    <div class="col-sm-3">
                                        <div class="class-close-content">
                                            <input type="text" id="ccateName" class="form-control chosen-select"
                                                   placeholder="下级分类"
                                                   onclick="toCategoryTwo()" readonly th:value="${product.ccateName}"/>
                                            <a id="ccate-close" class="glyphicon glyphicon-remove close-icon"
                                               onclick="categoryCloseClick('two')"></a>
                                        </div>
                                        <input type="hidden" id="ccate" name="ccate" th:value="${product.ccate}"/>
                                    </div>
                                </div>
                                <input type="hidden" id="teamId" th:value="${teamId}">
                                <div class="form-group" th:if="${teamId == null}">
                                    <label class="col-sm-2" style="padding-top: 7px;"><em class="gg-star"
                                                                                          style="margin-right: 7px">*</em>选择门店:</label>
                                    <div class="col-sm-6">
                                        <select data-placeholder="" class="form-control chosen-select"
                                                id="liansuoid"
                                                name="liansuoid">
                                            <option value="0">选择门店</option>
                                            <option th:selected="${product.liansuoid}==${item.id}"
                                                    th:each="item: ${teams}" th:text="${item.tXiaoqu+ +item.id}"
                                                    th:value="${item.id}"></option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;"> <em class="gg-star"
                                                                                           style="margin-right: 7px">*</em>商品图片：
                                    </label>
                                    <div>
                                        <div class="col-sm-6">
                                            <div class="input-group ">
                                                <input type="text" name="thumb" id="thumb" value="" class="form-control"
                                                       autocomplete="off" th:value="${product.thumb}">
                                                <span class="input-group-btn">
												<button class="btn btn-sm btn-default" type="button"
                                                        style="padding:7px 10px"
                                                        onclick="onSelectImgBtnClick('thumb','thumbImg')"
                                                >选择图片</button>
											</span>
                                            </div>
                                            <div class="input-group " style="margin-top:.5em;">
                                                <img th:src="@{${product.thumb}}" id="thumbImg" style="max-width: 30%"/>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="panel panel-default" style="padding-left: 0px;background-color:#EEEEEE">
                            <div class="panel-body panel-background">
                                <span>详细信息</span>
                            </div>
                        </div>
                        <div class="tab-content" style="border: 0px;">
                            <div class="tab-pane active">
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;"><em class="gg-star"
                                                                                          style="margin-right: 7px">*</em>商品库存:</label>
                                    <div class="col-sm-6">
                                        <input id="total" name="total" placeholder="请输入商品库存"
                                               class="form-control" min="0" type="number" maxlength="30" th:value="${product.total}">
                                    </div>
                                    <label class="col-sm-1" style="padding-top: 7px;">件</label>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;"><em class="gg-star"
                                                                                          style="margin-right: 7px">*</em>商品单位:</label>
                                    <div class="col-sm-6">
                                        <input id="unit" name="unit" placeholder="输入商品单位"
                                               class="form-control" type="text" maxlength="30" th:value="${product.unit}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;"><em class="gg-star"
                                                                                          style="margin-right: 7px">*</em>配送方式:</label>
                                    <div class="col-sm-10">
                                        <!--<label for="iszhicai" class="checkbox-inline">-->
                                        <!--<input type="checkbox" name="iszhicai" value="1" id="iszhicai"/> 直采-->
                                        <!--</label>-->
                                        <label class="checkbox-inline">
                                            <input type="checkbox" name="isziti" value="1" id="isziti"
                                                   onchange="iszitiChange()" th:checked="*{product.isziti}"/> 自提
                                        </label>
                                        <label class="checkbox-inline">
                                            <input type="checkbox" name="istangshi" value="1" id="istangshi"
                                                   onchange="istangshiChange()" th:checked="*{product.istangshi}"/> 堂食
                                        </label>
                                        <label class="checkbox-inline">
                                            <input type="checkbox" name="iswaimai" value="1" id="iswaimai"
                                                   onchange="iswaimaiChange()" th:checked="*{product.iswaimai}"/> 外卖
                                        </label>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;"> <em class="gg-star"
                                                                                           style="margin-right: 7px">*</em>商品价格：
                                    </label>
                                    <div class="col-sm-6">
                                        <div class="input-group form-group">
                                            <span class="input-group-addon">原价（划线价）</span>
                                            <input type="number" min="0" name="waimaiproductprice"
                                                   id="waimaiproductprice"
                                                   class="form-control" th:value="${product.productprice}"/>
                                            <span class="input-group-addon">元</span>
                                        </div>
                                        <div id="ziti" style="display: none">
                                            <div class="input-group form-group">
                                                <em class="gg-star">*</em><span class="input-group-addon">自提价</span>
                                                <input type="number" min="0" name="zitiprice" id="zitiprice"
                                                       class="form-control" th:value="${product.zitiprice}"/>
                                                <span class="input-group-addon">元 </span>
                                            </div>

                                            <div class="input-group form-group">
                                                <em class="gg-star">*</em><span class="input-group-addon">自提会员价</span>
                                                <input type="number" min="0" name="zitivipprice" id="zitivipprice"
                                                       class="form-control" th:value="${product.zitivipprice}"/>
                                                <span class="input-group-addon">元</span>
                                            </div>
                                        </div>
                                        <div id="tangshi" style="display: none">
                                            <div class="input-group form-group">
                                                <em class="gg-star">*</em><span class="input-group-addon">堂食价</span>
                                                <input type="number" min="0" name="tangshiprice" id="tangshiprice"
                                                       class="form-control" th:value="${product.tangshiprice}"/>
                                                <span class="input-group-addon">元</span>
                                            </div>
                                            <div class="input-group form-group">
                                                <em class="gg-star">*</em><span class="input-group-addon">堂食会员价</span>
                                                <input type="number" min="0" name="tangshivipprice" id="tangshivipprice"
                                                       class="form-control" th:value="${product.tangshivipprice}"/>
                                                <span class="input-group-addon">元</span>
                                            </div>
                                        </div>
                                        <div id="waimai" style="display: none">
                                            <div class="input-group form-group">
                                                <em class="gg-star">*</em><span class="input-group-addon">外卖价</span>
                                                <input type="number" min="0" name="waimaiprice" id="waimaiprice"
                                                       class="form-control" th:value="${product.waimaiprice}"/>
                                                <span class="input-group-addon">元</span>
                                            </div>
                                            <div class="input-group form-group">
                                                <em class="gg-star">*</em><span class="input-group-addon">外卖会员价</span>
                                                <input type="number" min="0" name="waimaivipprice" id="waimaivipprice"
                                                       class="form-control" th:value="${product.waimaivipprice}"/>
                                                <span class="input-group-addon">元</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;">消耗积分：
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="number" min="0" name="consumptionIntegral" id="consumptionIntegral"
                                               class="form-control" value="" th:value="${product.consumptionIntegral}"/>
                                    </div>
                                </div>

                                <div id="discount1" class="form-group" style="display: none">
                                    <label class="col-sm-2" style="padding-top: 7px;"><em class="gg-star"
                                                                                          style="margin-right: 7px">*</em>是否可打折：
                                    </label>
                                    <div class="col-sm-6">
                                        <label class="radio-inline">
                                            <input type="radio" name="discountStatus" value="1"  th:checked="*{product.discountStatus== 1}"/>是
                                        </label>
                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                        <label class="radio-inline">
                                            <input type="radio" name="discountStatus" value="0"  th:checked="*{product.discountStatus== 0}"/>否
                                        </label>
                                    </div>
                                </div>
                                <div id="discount2" class="form-group" style="display: none">
                                    <label class="col-sm-2" style="padding-top: 7px;"><em class="gg-star"
                                                                                          style="margin-right: 7px">*</em>折扣上限：
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="number" min="0" name="discount" id="discount"
                                               class="form-control" th:value="${product.discount}"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;"> <em class="gg-star"
                                                                                           style="margin-right: 7px">*</em>出售时间：
                                    </label>
                                    <div class="col-sm-10" style="padding-top: 5px;">
                                        <label for="istime1" class="radio-inline">
                                            <input type="radio" onclick='radioIsChecked()'
                                                   name="istime" value="1" id="istime1" th:checked="*{product.istime== 1}"/> 不限
                                        </label> &nbsp;&nbsp;&nbsp;
                                        <label for="istime2" class="radio-inline">
                                            <input type="radio" onclick='radioIsChecked()' name="istime"
                                                   value="0" id="istime2" th:checked="*{product.istime== 0}"/> 限时</label>
                                    </div>
                                </div>
                                <div class="form-group" id="istime">
                                    <div class="col-sm-10">
                                        <div class="col-sm-4 col-xs-6">
                                            <input type="text" name="timestart" id="timestart"
                                                   placeholder="请选择开始时间"
                                                   readonly="readonly" class="layui-input form-control"
                                                   style="padding-left: 12px;">
                                        </div>
                                        <div class="col-sm-4 col-xs-6">
                                            <input type="text" name="timeend" value="" id="timeend"
                                                   placeholder="请选择结束时间" readonly="readonly"
                                                   class="layui-input form-control"
                                                   style="padding-left: 12px;"/>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                        <div class="panel panel-default" style="padding-left: 0px;background-color:#EEEEEE">
                            <div class="panel-body panel-background">
                                <span>规格信息</span>
                            </div>
                        </div>

                        <!-- 商品规格部分  开始 -->
                        <div class="tab-pane" id="tab_option">
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-3 col-md-2">是否启用商品规格</label>
                                <div class="col-sm-9 col-xs-12">

                                    <label class="checkbox-inline"> <input type="checkbox"
                                                                           id="hasoption" value="1" name="hasoption"/>启用商品规格
                                    </label>
                                    <span class="help-block">启用商品规格后，商品的价格及库存以商品规格为准,库存设置为0则不显示,-1为不限制</span>
                                </div>
                            </div>

                            <div id='tboption' style="display: none">
                                <div class="alert alert-info">
                                    <!-- 1. 拖动规格可调整规格显示顺序, 更改规格及规格项后请点击下方的【刷新规格项目表】来更新数据。<br/> -->
                                    <!-- 2.  -->
                                    每一种规格代表不同型号，例如颜色为一种规格，尺寸为一种规格，如果设置多规格，手机用户必须每一种规格都选择一个规格项，才能添加购物车或购买。
                                </div>
                                <div id='specs'>

                                </div>

                                <table class="table">
                                    <tr>
                                        <td>
                                            <h4>
                                                <a href="javascript:;" class='btn btn-primary' id='add-spec'
                                                   onclick="addSpec()" style="margin-top: 10px; margin-bottom: 10px;"
                                                   title="添加规格">
                                                    <i class='fa fa-plus'></i> 添加规格
                                                </a>
                                                <a onclick="calc()" title="刷新规格项目表" class="btn btn-primary">
                                                    <i class="fa fa-refresh"></i> 刷新规格项目表
                                                </a>
                                            </h4>
                                        </td>
                                    </tr>
                                </table>

                                <div class="panel-body table-responsive" id="options"
                                     style="padding: 0;"></div>
                            </div>
                        </div>
                        <!-- 商品规格部分  结束 -->

                        <div class="form-group text-center" style="background-color: white">
                            <div class="col-sm-8 col-sm-offset-2">
                                <button class="btn btn-primary" onclick="saveProduct()">
                                    <i class="fa fa-check"></i>提交
                                </button>
                            </div>
                        </div>
                    </div>

                    <!--                套餐商品新增-->
                    <div id="taoCan" class="ibox-content tab-pane fade">
                        <div class="panel panel-default" style="padding-left: 0px;background-color:#EEEEEE">
                            <div class="panel-body panel-background">
                                <span>基本信息</span>
                            </div>
                        </div>
                        <div class="tab-content" style="border: 0px;">
                            <div class="tab-pane active">
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;">排序:</label>
                                    <div class="col-sm-6">
                                        <input id="displayorderPackage" name="displayorderPackage"
                                               class="form-control" type="number" min="0" maxlength="10"
                                               placeholder="数字越大，排名越靠前,限制小于2147483647" th:value="${product.displayorder}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;"><em class="gg-star"
                                                                                          style="margin-right: 7px">*</em>套餐名称:</label>
                                    <div class="col-sm-6">
                                        <input id="packageTitle" name="packageTitle" placeholder="请输入30字以内的套餐名称"
                                               class="form-control" type="text" maxlength="30" th:value="${product.title}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;">商品短标题:</label>
                                    <div class="col-sm-6">
                                        <input id="shortTitlePackage" name="shortTitlePackage" placeholder="打印专用短标题(8个汉字以内)"
                                               class="form-control" type="text" maxlength="8" th:value="${product.shortTitle}">
                                    </div>
                                </div>
                                <!--                                <div class="form-group">-->
                                <!--                                    <label class="col-sm-2" style="padding-top: 7px;"> <em class="gg-star"-->
                                <!--                                                                                           style="margin-right: 7px">*</em>分类：-->
                                <!--                                    </label>-->
                                <!--                                    <div class="col-sm-3">-->
                                <!--                                        <div class="class-close-content">-->
                                <!--                                            <input type="text" id="packagePcateName" class="form-control chosen-select"-->
                                <!--                                                   placeholder="顶级分类"-->
                                <!--                                                   onclick="packageToCategoryOne()" readonly/>-->
                                <!--                                            <a id="packagePcate-close" class="glyphicon glyphicon-remove close-icon"-->
                                <!--                                               onclick="packageCategoryCloseClick('one')"></a>-->
                                <!--                                        </div>-->
                                <!--                                        <input type="hidden" id="packagePcate" name="packagePcate"/>-->
                                <!--                                    </div>-->
                                <!--                                    <div class="col-sm-3">-->
                                <!--                                        <div class="class-close-content">-->
                                <!--                                            <input type="text" id="packageCcateName" class="form-control chosen-select"-->
                                <!--                                                   placeholder="下级分类"-->
                                <!--                                                   onclick="packageToCategoryTwo()" readonly/>-->
                                <!--                                            <a id="packageCcate-close" class="glyphicon glyphicon-remove close-icon"-->
                                <!--                                               onclick="packageCategoryCloseClick('two')"></a>-->
                                <!--                                        </div>-->
                                <!--                                        <input type="hidden" id="packageCcate" name="packageCcate"/>-->
                                <!--                                    </div>-->
                                <!--                                </div>-->
                                <div class="form-group" th:if="${teamId == null}">
                                    <label class="col-sm-2" style="padding-top: 7px;"><em class="gg-star"
                                                                                          style="margin-right: 7px">*</em>选择门店:</label>
                                    <div class="col-sm-6">
                                        <select data-placeholder="" class="form-control chosen-select"
                                                id="liansuoidPackage"
                                                name="liansuoidPackage">
                                            <option value="0">选择门店</option>
                                            <option th:selected="${product.liansuoid}==${item.id}"
                                                    th:each="item: ${teams}" th:text="${item.tXiaoqu+ +item.id}"
                                                    th:value="${item.id}"></option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;"> <em class="gg-star"
                                                                                           style="margin-right: 7px">*</em>商品图片：
                                    </label>
                                    <div>
                                        <div class="col-sm-6">
                                            <div class="input-group ">
                                                <input type="text" name="thumbPackage" id="thumbPackage" value=""
                                                       class="form-control"
                                                       autocomplete="off" th:value="${product.thumb}">
                                                <span class="input-group-btn">
												<button class="btn btn-sm btn-default" type="button"
                                                        style="padding:7px 10px"
                                                        onclick="onSelectImgBtnClick('thumbPackage','thumbImgPackage')"
                                                >选择图片</button>
											</span>
                                            </div>
                                            <div class="input-group " style="margin-top:.5em;">
                                                <img th:src="@{${product.thumb}}" id="thumbImgPackage" style="max-width: 30%"/>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="panel panel-default" style="padding-left: 0px;background-color:#EEEEEE">
                            <div class="panel-body panel-background">
                                <span>设置套餐</span>
                            </div>
                        </div>
                        <div class="tab-content" style="border: 0px;">
                            <div class="tab-pane active">
                                <div class="row">
                                    <!--                                    <div class="col-sm-6 col-md-4">-->
                                    <!--                                        <div class="thumbnail" style="width: 360px;height: 400px;">-->
                                    <!--                                            <img style="border:1px solid #ddd;padding:5px;min-width:95%;min-height:70%;max-width:95%;max-height:70%;" id="packageThumb" src="...">-->
                                    <!--                                            <div class="caption">-->
                                    <!--                                                <h3 id="productName">单品名称</h3>-->
                                    <!--                                                <p id="spec">规格项</p>-->
                                    <!--                                                <p id="inventory">剩余库存</p>-->
                                    <!--                                                <p><a href="#" class="btn btn-primary" role="button">删除</a> <a href="#" class="btn btn-default" role="button">选择商品</a></p>-->
                                    <!--                                            </div>-->
                                    <!--                                        </div>-->
                                    <!--                                    </div>-->
                                    <div id="packageEnd" class="col-sm-6 col-md-4" onclick="addPackage()">
                                        <div class="thumbnailImg">
                                            <span class="glyphicon glyphicon-plus-sign" aria-hidden="true"
                                                  style="font-size:100px;"></span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="panel panel-default" style="padding-left: 0px;background-color:#EEEEEE">
                            <div class="panel-body panel-background">
                                <span>详细信息</span>
                            </div>
                        </div>
                        <div class="tab-content" style="border: 0px;">
                            <div class="tab-pane active">
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;"><em class="gg-star"
                                                                                          style="margin-right: 7px">*</em>商品库存:</label>
                                    <div class="col-sm-6">
                                        <input id="packageTotal" name="total" placeholder="请输入商品库存"
                                               class="form-control" min="0" type="number" maxlength="30" th:value="${product.total}">
                                    </div>
                                    <label class="col-sm-1" style="padding-top: 7px;">件</label>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;"><em class="gg-star"
                                                                                          style="margin-right: 7px">*</em>商品单位:</label>
                                    <div class="col-sm-6">
                                        <input id="packageUnit" name="packageUnit" placeholder="输入商品单位"
                                               class="form-control" type="text" maxlength="30" th:value="${product.unit}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;"><em class="gg-star"
                                                                                          style="margin-right: 7px">*</em>配送方式:</label>
                                    <div class="col-sm-10">
                                        <!--<label for="iszhicai" class="checkbox-inline">-->
                                        <!--<input type="checkbox" name="iszhicai" value="1" id="iszhicai"/> 直采-->
                                        <!--</label>-->
                                        <label class="checkbox-inline">
                                            <input type="checkbox" name="iszitiPackage" value="1" id="iszitiPackage"
                                                   onchange="iszitiPackageChange()" th:checked="${product.isziti}"/> 自提
                                        </label>
                                        <label class="checkbox-inline">
                                            <input type="checkbox" name="istangshiPackage" value="1"
                                                   id="istangshiPackage"
                                                   onchange="istangshiPackageChange()" th:checked="${product.istangshi}"/> 堂食
                                        </label>
                                        <label class="checkbox-inline">
                                            <input type="checkbox" name="iswaimaiPackage" value="1" id="iswaimaiPackage"
                                                   onchange="iswaimaiPackageChange()" th:checked="${product.iswaimai}"/> 外卖
                                        </label>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;"> <em class="gg-star"
                                                                                           style="margin-right: 7px">*</em>商品价格：
                                    </label>
                                    <div class="col-sm-6">
                                        <div class="input-group form-group">
                                            <span class="input-group-addon">原价（划线价）</span>
                                            <input type="number" min="0" name="waimaiproductpricePackage"
                                                   id="waimaiproductpricePackage"
                                                   class="form-control" th:value="${product.productprice}"/>
                                            <span class="input-group-addon">元</span>
                                        </div>
                                        <div id="zitiPackage" style="display: none">
                                            <div class="input-group form-group">
                                                <em class="gg-star">*</em><span class="input-group-addon">自提价</span>
                                                <input type="number" min="0" name="zitipricePackage"
                                                       id="zitipricePackage"
                                                       class="form-control" th:value="${product.zitiprice}"/>
                                                <span class="input-group-addon">元 </span>
                                            </div>

                                            <div class="input-group form-group">
                                                <em class="gg-star">*</em><span class="input-group-addon">自提会员价</span>
                                                <input type="number" min="0" name="zitivippricePackage"
                                                       id="zitivippricePackage"
                                                       class="form-control" th:value="${product.zitivipprice}"/>
                                                <span class="input-group-addon">元</span>
                                            </div>
                                        </div>
                                        <div id="tangshiPackage" style="display: none">
                                            <div class="input-group form-group">
                                                <em class="gg-star">*</em><span class="input-group-addon">堂食价</span>
                                                <input type="number" min="0" name="tangshipricePackage"
                                                       id="tangshipricePackage"
                                                       class="form-control" th:value="${product.tangshiprice}"/>
                                                <span class="input-group-addon">元</span>
                                            </div>
                                            <div class="input-group form-group">
                                                <em class="gg-star">*</em><span class="input-group-addon">堂食会员价</span>
                                                <input type="number" min="0" name="tangshivippricePackage"
                                                       id="tangshivippricePackage"
                                                       class="form-control" th:value="${product.tangshivipprice}"/>
                                                <span class="input-group-addon">元</span>
                                            </div>
                                        </div>
                                        <div id="waimaiPackage" style="display: none">
                                            <div class="input-group form-group">
                                                <em class="gg-star">*</em><span class="input-group-addon">外卖价</span>
                                                <input type="number" min="0" name="waimaipricePackage"
                                                       id="waimaipricePackage"
                                                       class="form-control" th:value="${product.waimaiprice}"/>
                                                <span class="input-group-addon">元</span>
                                            </div>
                                            <div class="input-group form-group">
                                                <em class="gg-star">*</em><span class="input-group-addon">外卖会员价</span>
                                                <input type="number" min="0" name="waimaivippricePackage"
                                                       id="waimaivippricePackage"
                                                       class="form-control" th:value="${product.waimaivipprice}"/>
                                                <span class="input-group-addon">元</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;">消耗积分：
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="number" min="0" name="consumptionIntegralPackage" id="consumptionIntegralPackage"
                                               class="form-control" value="" th:value="${product.consumptionIntegral}"/>
                                    </div>
                                </div>

                                <div id="discount1Package" class="form-group" style="display: none">
                                    <label class="col-sm-2" style="padding-top: 7px;"><em class="gg-star"
                                                                                          style="margin-right: 7px">*</em>是否可打折：
                                    </label>
                                    <div class="col-sm-6">
                                        <label class="radio-inline">
                                            <input type="radio" name="discountStatusPackage" value="1" th:checked="${product.discountStatus == 1}"/>是
                                        </label>
                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                        <label class="radio-inline">
                                            <input type="radio" name="discountStatusPackage" value="0"
                                                   th:checked="${product.discountStatus == 0}"/>否
                                        </label>
                                    </div>
                                </div>
                                <div id="discount2Package" class="form-group" style="display: none">
                                    <label class="col-sm-2" style="padding-top: 7px;"><em class="gg-star"
                                                                                          style="margin-right: 7px">*</em>折扣上限：
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="number" min="0" name="discountPackage" id="discountPackage"
                                               class="form-control" th:value="${product.discount}"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2" style="padding-top: 7px;"> <em class="gg-star"
                                                                                           style="margin-right: 7px">*</em>出售时间：
                                    </label>
                                    <div class="col-sm-10" style="padding-top: 5px;">
                                        <label for="istime1Package" class="radio-inline">
                                            <input type="radio" onclick='radioIsCheckedPackage()'
                                                   name="istimePackage" value="1" id="istime1Package" th:value="${product.istime == 1}"/> 不限
                                        </label> &nbsp;&nbsp;&nbsp;
                                        <label for="istime2Package" class="radio-inline">
                                            <input type="radio" onclick='radioIsCheckedPackage()' name="istimePackage"
                                                   value="0" id="istime2Package" checked="checked" th:value="${product.istime == 0}"/> 限时</label>
                                    </div>
                                </div>
                                <div class="form-group" id="istimePackage">
                                    <div class="col-sm-10">
                                        <div class="col-sm-4 col-xs-6">
                                            <input type="text" name="timestartPackage" id="timestartPackage"
                                                   placeholder="请选择开始时间"
                                                   readonly="readonly" class="layui-input form-control"
                                                   style="padding-left: 12px;">
                                        </div>
                                        <div class="col-sm-4 col-xs-6">
                                            <input type="text" name="timeendPackage" value="" id="timeendPackage"
                                                   placeholder="请选择结束时间" readonly="readonly"
                                                   class="layui-input form-control"
                                                   style="padding-left: 12px;"/>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                        <div class="form-group text-center" style="background-color: white">
                            <div class="col-sm-8 col-sm-offset-2">
                                <button class="btn btn-primary" onclick="saveProductPackage()">
                                    <i class="fa fa-check"></i>提交
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div th:include="include::footer"></div>
<script type="text/javascript" src="/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" src="/js/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" src="/js/ueditor/custom.js?v=2"></script>
<script type="text/javascript" src="/js/appjs/product/AreaData.js"></script>
<script type="text/javascript" src="/public/ace/js/ace-extra.js"></script>
<script type="text/javascript" src="/js/plugins/layui/layui.js"></script>
<script src="/js/jquery-select/jquery.searchableSelect.js"></script>
<script type="text/javascript" src="/js/appjs/product/restaurant/edit.js"></script>
<script type="text/javascript">

</script>

</body>
</html>
